<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./axios.js"></script>
<body>
    <script>  
     axios.defaults.baseURL = 'http://www.itcbc.com:3006'
        let p1 = axios.get('/api/province')
        let p2 = axios.get('/api/city',{params:{pname:'贵州省'}})
        let p3 = axios.get('/api/county',{params:{pname:'贵州省',cname:'铜仁市'}})
        Promise.all([p1,p2,p3]).then(res =>{
            console.log(res);
        })
        Promise.race([p1,p2,p3]).then(res =>{
            console.log(res);
        })
        Promise.resolve('123').then(res =>{
            console.log(res);//123
        }).catch(err =>{
            console.log(err);
        })
        Promise.reject('123').then(res =>{
            console.log(res);
        }).catch(err =>{
            console.log(err);//123
        })
    </script>
</body>
</html>